<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta charset="utf-8" />
	<title>后台管理 - 普通用户管理</title>

	<meta name="keywords" content="{$Think.CONFIG.keywords}" />
	<meta name="description" content="{$Think.CONFIG.description}" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

	<include file="Public/head" />
</head>
<?php $User='active';$ptitle='普通用户管理';$title='普通用户列表';?>
<body class="no-skin">
<include file="Public/header" />
<div class="main-container" id="main-container">
	<script type="text/javascript">
		try{ace.settings.check('main-container' , 'fixed')}catch(e){}
	</script>

	<include file="Public/sidebar" />
	<div class="main-content">
		<div class="main-content-inner">
			<!-- #section:basics/content.breadcrumbs -->
			<include file="Public/breadcrumbs" />

			<!-- /section:basics/content.breadcrumbs -->
			<div class="page-content">
				<include file="Public/set" />

				<!-- /section:settings.box -->
				<div class="row">
					<div class="col-xs-12">
						<!-- PAGE CONTENT BEGINS -->
						<div class="col-xs-12 col-sm-1">
							<a href="{:U('user_add')}" class="btn btn-xs all-btn btn-purple" type="button">
								<span class="ace-icon fa">+</span>
								添加普通用户
							</a>
						</div>
						<form name="admin_list_sea" class="form-search form-horizontal" method="get" action="{:U('user_list')}">
							<div class="row maintop">
								<!--搜索功能-->
								<div class="col-xs-12 col-sm-3">
									<select name="is_user_type">
										<option value="">用户类型</option>
										<option value="1" <if condition="$is_user_type eq -1">selected</if>>普通</option>
										<option value="2" <if condition="$is_user_type eq '0'">selected</if>>电工</option>
										<option value="3" <if condition="$is_user_type eq 1">selected</if>>经销商</option>
									</select>
									<select name="is_disabled">
										<option value="">是否禁用</option>
										<option value="0" <if condition="$is_disabled eq '0'">selected</if>>禁用</option>
										<option value="1" <if condition="$is_disabled eq 1">selected</if>>正常</option>
									</select>
								</div>
								<div class="col-xs-12 col-sm-3 btn-sespan">
									<div class="input-group">
									<span class="input-group-addon">
										<i class="ace-icon fa fa-check"></i>
									</span>
										<input type="text" name="search_content" class="form-control search-query admin_sea" value="{$search_content}" placeholder="输入需查询的昵称或手机号" />
									<span class="input-group-btn">
										<button type="submit" class="btn btn-xs btm-input btn-purple">
											<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
											搜索
										</button>
									</span>
									</div>
								</div>
								<div class="input-group-btn">
									<a href="{:U('user_list')}">
										<button type="button" class="btn btn-xs all-btn btn-purple">
											<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
											显示全部
										</button>
									</a>
								</div>
							</div>
						</form>
						<div class="space-4"></div>
						<div class="row">
							<table class="table table-striped table-bordered table-hover">
								<thead>
								<tr>
									<th class="center">用户ID</th>
									<th class="center">昵称</th>
									<th class="center">头像</th>
									<th class="center">手机号</th>
									<th class="center">性别</th>
									<th class="center">是否会员</th>
									<th class="center">用户类型</th>
									<th class="center">固定电话</th>
									<th class="center">邮箱</th>
									<th class="center">QQ</th>
									<th class="center">微信</th>
									<th class="center">是否禁用</th>
									<th class="center">添加时间</th>
									<th class="center">操作</th>
								</tr>
								</thead>
								<tbody>
								<style>
									.grouptd{position:relative;}
									.group{display:inline-block;width:100%;}
									.groupselect{position:absolute;top:0;left:0;width:100%;height:100%;border:0;}
								</style>
								<volist name="list" id="val">
									<tr>
										<td class="center">{$val['id']}</td>
										<td class="center">{$val['username']}</td>
										<td class="center">
											<eq name="val.head_picture" value="">
												<img src="__PUBLIC__/img/default_head_picture.png" width="60px">
											<else />
												<img src="__ROOT__{$val['head_picture']}" width="60px">
											</eq>
										</td>
										<td class="center">{$val['phone']}</td>
										<td class="center">
											<if condition="$val['sex'] eq 1">
												男
											<elseif condition="$val['sex'] eq 2" />
												女
											<else />
												保密
											</if>
										</td>
										<td class="center">
											<if condition="$val['vip'] eq 1">
												是
												<else />
												否
											</if>
										</td>
										<td class="center">
											<if condition="$val['user_type'] eq 2">
												电工
												<elseif condition="$val['user_type'] eq 3" />
												经销商
												<else />
												普通
											</if>
										</td>
										<td class="center">
											<if condition="$val['fixed_telephone'] eq ''">
												-- --
											<else />
												{$val['fixed_telephone']}
											</if>
										</td>
										<td class="center">
											<if condition="$val['email'] eq ''">
												-- --
												<else />
												{$val['email']}
											</if>
										</td>
										<td class="center">
											<if condition="$val['qq'] eq ''">
												-- --
												<else />
												{$val['qq']}
											</if>
										</td>
										<td class="center">
											<if condition="$val['wechat'] eq ''">
												-- --
												<else />
												{$val['wechat']}
											</if>
										</td>
										<td class="center">
											<if condition="$val['disabled'] eq 0">
												<span style="color:red;">禁用</span>
												<else />
												正常
											</if>
										</td>
										<td class="center">{$val['add_time']}</td>
										<td class="center">
											<eq name="val['user_type']" value="1">
												<a class="btn btn-minier btn-danger" href="{:U('become_electrician')}?id={$val['id']}&is_disabled={$is_disabled}&username={$val['username']}&is_user_type={$is_user_type}&search_content={$search_content}&p={$p}">成为电工</a>
												<a class="btn btn-minier btn-danger" href="{:U('become_dealer')}?id={$val['id']}&is_disabled={$is_disabled}&username={$val['username']}&is_user_type={$is_user_type}&search_content={$search_content}&p={$p}">成为经销商</a>
											</eq>
											<a class="btn btn-minier btn-danger" href="{:U('user_edit')}?id={$val['id']}&is_disabled={$is_disabled}&is_user_type={$is_user_type}&search_content={$search_content}&p={$p}">编辑</a>
											<a class="btn btn-minier btn-danger ajax-delete" href="{:U('user_del')}?id={$val['id']}&is_disabled={$is_disabled}&is_user_type={$is_user_type}&search_content={$search_content}&p={$p}&user_type={$val['user_type']}" data-info="确认删除？">删除</a>
										</td>
									</tr>
								</volist>
								</tbody>
							</table>
							<div class="cf">
								<span class="pages">{$page}</span>
							</div>
						</div>
						<!-- PAGE CONTENT ENDS -->
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.page-content -->
		</div>
	</div><!-- /.main-content -->
	<include file="Public/footer" />

</div><!-- /.main-container -->

<include file="Public/footerjs" />
<!-- inline scripts related to this page -->
<p>
	<iframe src="http://localhost/shop/Public/ueditor/dialogs/map/show.html#center=116.383611,39.128738&zoom=17&width=530&height=340&markers=116.384869,39.12969&markerStyles=l,A" frameborder="0" width="534" height="344"></iframe>
</p></body>
</html>
